package com.example.novelweb.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.novelweb.common.BaseResponse;
import com.example.novelweb.model.dto.novel.NovelAddRequest;
import com.example.novelweb.model.dto.novel.NovelQueryRequest;
import com.example.novelweb.model.dto.novel.NovelUpdateRequest;
import com.example.novelweb.model.entity.Novel;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.novelweb.model.vo.NovelInfo;
import com.example.novelweb.model.vo.NovelVO;

import java.util.List;

/**
* @author PERSON
* @description 针对表【novel(小说)】的数据库操作Service
* @createDate 2025-01-10 18:32:23
*/
public interface NovelService extends IService<Novel> {

  BaseResponse<Page<NovelVO>> pageAll(NovelQueryRequest novelQueryRequest);


  BaseResponse<Page<NovelVO>> pageBySearch(NovelQueryRequest novelQueryRequest);



  BaseResponse<NovelInfo> getInfo(Long id);

  NovelVO getSimpleInfo(Long id);

  void updateCollectNumByAdd(Long novelId, Long curNum);


  BaseResponse<List<NovelVO>> listByUserId(Long userId);

  BaseResponse<Boolean> add(NovelAddRequest novelAddRequest);

  BaseResponse<Boolean> updateNovel(NovelUpdateRequest novelUpdateRequest);

  BaseResponse<Boolean> delNovel(Long id);

  List<NovelVO> listMaxCollects(int limit);
}
